<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Angular JS Form</title>
 <link rel="stylesheet" href="bootstrap.min.css"> 
    <style>
        body     { padding-top:30px; }
    </style>
    <script src="angular.min.js"></script> 
    <script src="app.js"></script>
</head>

<body ng-app="validationApp" ng-controller="mainController">
<div class="container">
<div class="col-sm-8 col-sm-offset-2">
     
    <!-- PAGE HEADER -->
    <div class="page-header"><h1>AngularJS Form Validation</h1></div>
<form name="userForm">
        <!-- NAME -->
        <div class="form-group" >
            <label>用户名</label>
            <!-- requested 表示这个字段必须要填的 -->
            <input type="text" name="name" class="form-control" ng-model="name" required>
			
        </div>
         <div class="form-group" >
            <label>密码</label>
            <!--密码  ng-minlength="6" ng-maxlength="14" 表示密码 的长度最少为6位，最多为14位-->
            <input type="text" name="pwd" class="form-control" ng-model="pwd" required ng-minlength="6" ng-maxlength="14">
			
        </div>
         <div class="form-group" >
            <label>邮箱</label>
            <!--密码 type="email" 这里只能输入邮箱格式  -->
            <input type="email" name="email" class="form-control" ng-model="email">			
        </div>
            <!-- SUBMIT BUTTON -->
        <button type="submit" class="btn btn-primary" ng-disabled="userForm.$invalid">提交</button>


</form>

</body>
</html>